/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ee.asynchronous;

import java.util.concurrent.Future;
import javax.ejb.AsyncResult;
import javax.ejb.Asynchronous;
import javax.ejb.Stateless;

/**
 *
 * @author Gabriel Bran <gbran.u@gmail.com>
 */
@Stateless
public class AsynchronousBean {

    @Asynchronous
    public Future<String> pruebaTareaAsincrona() {
        return new AsyncResult<String>("Tarea completada: hilo => " + Thread.currentThread().getName());
    }
}
